home *** CD-ROM | disk | FTP | other *** search
- property whichevent, Addressee, EventToSend
-
- on getPropertyDescriptionList
- set description to [:]
- addProp(description, #whichevent, [#default: #mouseUp, #format: #symbol, #comment: "On Which Event:", #range: [#mouseUp, #mouseDown, #enterFrame, #exitFrame]])
- addProp(description, #Addressee, [#default: 1, #format: #integer, #comment: "Which Sprite Gets the Event:"])
- addProp(description, #EventToSend, [#default: #generic_event, #format: #symbol, #comment: "Event To Send:"])
- return description
- end
-
- on getBehaviorDescription
- return "Send an event to a sprite"
- end
-
- on getAssocMembers
- set myPropList to []
- return myPropList
- end
-
- on do_it me
- call(the Addressee of me, the EventToSend of me)
- end
-
- on mouseUp me
- if the whichevent of me = #mouseUp then
- do_it(me)
- end if
- end
-
- on mouseDown me
- if the whichevent of me = #mouseDown then
- do_it(me)
- end if
- end
-
- on enterFrame me
- if the whichevent of me = #enterFrame then
- do_it(me)
- end if
- end
-
- on exitFrame me
- if the whichevent of me = #exitFrame then
- do_it(me)
- end if
- end
-